#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

class Furniture
{
protected:
    int weight;
public:
    Furniture() {}
    void setWeight(int i) { weight = i; }
    int getWeight() { return weight; }
};

class Bed : virtual public Furniture {
public:
    void sleep() {
        cout << "Sleeping" << endl;
    }
};

class Sofa : virtual public Furniture {
public:
    void watchTV() {
        cout << "Watching TV" << endl;
    }
};

class SleeperSofa :public Bed, public Sofa
{
public:
    SleeperSofa() {}
    void foldout()
    {
        cout << "Fold out sleepersofa" << endl;
    }
};
int main()
{
    SleeperSofa ss;
    ss.setWeight(20);
    cout << ss.getWeight() << endl;
    ss.sleep();
    ss.watchTV();
    ss.foldout();
    return 0;
}
